Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

A__ZPRIMESA__NATS(s(s(0)))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(filter(X1, X2, X3)) → MARK(X2)
A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(s(X)) → MARK(X)
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → A__ZPRIMES
A__SIEVE(cons(s(N), Y)) → MARK(N)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

A__ZPRIMESA__NATS(s(s(0)))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(filter(X1, X2, X3)) → MARK(X2)
A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(s(X)) → MARK(X)
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(nats(X)) → MARK(X)
MARK(zprimes) → A__ZPRIMES
A__SIEVE(cons(s(N), Y)) → MARK(N)
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
QDP
          ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

A__ZPRIMESA__NATS(s(s(0)))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(filter(X1, X2, X3)) → MARK(X2)
A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(s(X)) → MARK(X)
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(nats(X)) → MARK(X)
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(zprimes) → A__ZPRIMES
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
MARK(sieve(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


A__ZPRIMESA__NATS(s(s(0)))
MARK(filter(X1, X2, X3)) → MARK(X1)
MARK(filter(X1, X2, X3)) → MARK(X3)
MARK(filter(X1, X2, X3)) → MARK(X2)
MARK(s(X)) → MARK(X)
A__ZPRIMESA__SIEVE(a__nats(s(s(0))))
A__SIEVE(cons(s(N), Y)) → MARK(N)
MARK(zprimes) → A__ZPRIMES
A__FILTER(cons(X, Y), s(N), M) → MARK(X)
The remaining pairs can at least be oriented weakly.

A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(nats(X)) → MARK(X)
MARK(sieve(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
Used ordering: Combined order from the following AFS and order.
A__ZPRIMES  =  A__ZPRIMES
A__NATS(x1)  =  x1
s(x1)  =  s(x1)
0  =  0
MARK(x1)  =  x1
filter(x1, x2, x3)  =  filter(x1, x2, x3)
nats(x1)  =  x1
mark(x1)  =  x1
A__FILTER(x1, x2, x3)  =  A__FILTER(x1, x2, x3)
A__SIEVE(x1)  =  x1
a__nats(x1)  =  x1
sieve(x1)  =  x1
cons(x1, x2)  =  x1
zprimes  =  zprimes
a__filter(x1, x2, x3)  =  a__filter(x1, x2, x3)
a__zprimes  =  a__zprimes
a__sieve(x1)  =  x1

Recursive path order with status [2].
Quasi-Precedence:
[filter3, AFILTER3, afilter3] > 0
[zprimes, azprimes] > AZPRIMES > s1
[zprimes, azprimes] > AZPRIMES > 0

Status:
filter3: [3,1,2]
afilter3: [3,1,2]
zprimes: multiset
AFILTER3: [3,1,2]
AZPRIMES: multiset
0: multiset
s1: [1]
azprimes: multiset


The following usable rules [14] were oriented:

a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
mark(0) → 0
a__zprimesa__sieve(a__nats(s(s(0))))
mark(sieve(X)) → a__sieve(mark(X))
mark(s(X)) → s(mark(X))
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__nats(N) → cons(mark(N), nats(s(N)))
mark(nats(X)) → a__nats(mark(X))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__zprimeszprimes
mark(zprimes) → a__zprimes
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(filter(X1, X2, X3)) → A__FILTER(mark(X1), mark(X2), mark(X3))
MARK(sieve(X)) → A__SIEVE(mark(X))
MARK(nats(X)) → MARK(X)
A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
QDP
                  ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(nats(X)) → MARK(X)
A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK(sieve(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.

MARK(nats(X)) → MARK(X)
A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
nats(x1)  =  x1
A__NATS(x1)  =  A__NATS(x1)
mark(x1)  =  x1
cons(x1, x2)  =  x1
sieve(x1)  =  sieve(x1)
a__filter(x1, x2, x3)  =  x1
s(x1)  =  s
filter(x1, x2, x3)  =  x1
0  =  0
a__zprimes  =  a__zprimes
a__sieve(x1)  =  a__sieve(x1)
a__nats(x1)  =  x1
zprimes  =  zprimes

Recursive path order with status [2].
Quasi-Precedence:
[MARK1, ANATS1] > 0
[azprimes, zprimes] > [sieve1, s, asieve1] > 0

Status:
ANATS1: [1]
sieve1: [1]
zprimes: multiset
MARK1: [1]
0: multiset
s: []
asieve1: [1]
azprimes: multiset


The following usable rules [14] were oriented:

a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
mark(0) → 0
a__zprimesa__sieve(a__nats(s(s(0))))
mark(sieve(X)) → a__sieve(mark(X))
mark(s(X)) → s(mark(X))
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__nats(N) → cons(mark(N), nats(s(N)))
mark(nats(X)) → a__nats(mark(X))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__zprimeszprimes
mark(zprimes) → a__zprimes
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
QDP
                      ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(nats(X)) → MARK(X)
A__NATS(N) → MARK(N)
MARK(nats(X)) → A__NATS(mark(X))
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK(nats(X)) → MARK(X)
MARK(nats(X)) → A__NATS(mark(X))
The remaining pairs can at least be oriented weakly.

A__NATS(N) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  x1
nats(x1)  =  nats(x1)
A__NATS(x1)  =  x1
mark(x1)  =  x1
cons(x1, x2)  =  x1
a__filter(x1, x2, x3)  =  x1
s(x1)  =  s
filter(x1, x2, x3)  =  x1
0  =  0
a__zprimes  =  a__zprimes
a__sieve(x1)  =  a__sieve
a__nats(x1)  =  a__nats(x1)
sieve(x1)  =  sieve
zprimes  =  zprimes

Recursive path order with status [2].
Quasi-Precedence:
[azprimes, asieve, sieve, zprimes] > [nats1, anats1] > 0
[azprimes, asieve, sieve, zprimes] > s > 0

Status:
zprimes: multiset
0: multiset
asieve: []
s: []
sieve: []
nats1: [1]
anats1: [1]
azprimes: multiset


The following usable rules [14] were oriented:

a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
mark(0) → 0
a__zprimesa__sieve(a__nats(s(s(0))))
mark(sieve(X)) → a__sieve(mark(X))
mark(s(X)) → s(mark(X))
a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__nats(N) → cons(mark(N), nats(s(N)))
mark(nats(X)) → a__nats(mark(X))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__zprimeszprimes
mark(zprimes) → a__zprimes
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ QDPOrderProof
QDP
                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

A__NATS(N) → MARK(N)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ QDPOrderProof
                        ↳ QDP
                          ↳ DependencyGraphProof
QDP
                              ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
cons(x1, x2)  =  cons(x1)

Recursive path order with status [2].
Quasi-Precedence:
[MARK1, cons1]

Status:
MARK1: multiset
cons1: multiset


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ QDPOrderProof
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ QDPOrderProof
QDP
                                  ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

a__filter(cons(X, Y), 0, M) → cons(0, filter(Y, M, M))
a__filter(cons(X, Y), s(N), M) → cons(mark(X), filter(Y, N, M))
a__sieve(cons(0, Y)) → cons(0, sieve(Y))
a__sieve(cons(s(N), Y)) → cons(s(mark(N)), sieve(filter(Y, N, N)))
a__nats(N) → cons(mark(N), nats(s(N)))
a__zprimesa__sieve(a__nats(s(s(0))))
mark(filter(X1, X2, X3)) → a__filter(mark(X1), mark(X2), mark(X3))
mark(sieve(X)) → a__sieve(mark(X))
mark(nats(X)) → a__nats(mark(X))
mark(zprimes) → a__zprimes
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__filter(X1, X2, X3) → filter(X1, X2, X3)
a__sieve(X) → sieve(X)
a__nats(X) → nats(X)
a__zprimeszprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.